//index.js
//获取应用实例
var util = require('../../utils/util.js');
var app = getApp();
var today = util.formatTime(new Date((new Date()).getTime() + (1000 * 60 * 60 * 24 * 7))).split(' ')[0];
var minday = util.formatTime(new Date()).split(' ')[0];
var maxday = util.formatTime(new Date((new Date()).getTime() + (1000 * 60 * 60 * 24 * 62))).split(' ')[0];
var sliderWidth = 96; // 需要设置slider的宽度，用于计算中间位置
var page = 1;
var list = new Array();
var list1 = new Array();
var list2 = new Array();

Page({
  data: {
    
  },
  tabClick: function (e) {
        this.setData({
            sliderOffset: e.currentTarget.offsetLeft,
            activeIndex: e.currentTarget.id
        });
    },
  onShareAppMessage: function () {
    // return {
    //   title: '皮皮虾拼车',
    //   path: 'pages/index/index'
    // }
  },
  onPullDownRefresh: function () {
    page = 1;
    wx.stopPullDownRefresh();
  },
  onLoad: function () {
    var that = this;
    util.req('/wx/index/getImg', {}, function (data) {
      that.setData({ movies: data.content });
    })
  },
  onReachBottom: function () {
    if (!this.data.nomore) {
      page++;
    }
  }
})
